<include file="public/min-header"/>
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="public/breadcrumb"/>
    <section class="content ">
        <!-- Main content -->
        <div class="container-fluid">

            <div class="panel panel-default">
                <div class="panel-body ">   
                    <!--表单数据-->
                    <form method="post" id="handle_shop">

                        <!--通用信息-->
                    <div class="tab-content col-md-10">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>打位名称：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="positionName" value="{$detail.positionName}" placeholder="请输入打位名称">
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>打位号：</td>
                                    <td class="col-sm-8">
                                        <input type="number" class="form-control" name="positionNo" value="{$detail.positionNo}" placeholder="请输入打位号，eq：打位15，输入15即可">
                                    </td>
                                </tr>

                                <tr>
                                    <td class="col-sm-2"><span style="color:#F00;">*</span>所属店铺：</td>
                                    <td class="col-sm-8">
                                        <select class="form-control" name="positionShopId">
                                            <option value="">==请选择所属店铺==</option>

                                            <volist name="shopList" id="shopList">
                                                <option value="{$shopList.shopId}" <if condition="$detail.positionShopId == $shopList.shopId">selected="selected"</if> >{$shopList.shopName}</option>
                                            </volist>

                                        </select>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td><span style="color:#F00;">*</span>平时价格:</td>
                                    <td class="col-sm-8">
                                        <div class="col-xs-4">
                                            上午时段：<input type="text" class="form-control input-sm" name="peacetimePriceAm" value="{$detail.peacetimePriceAm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员上午时段：<input type="text" class="form-control input-sm" name="memberPeacetimePriceAm" value="{$detail.memberPeacetimePriceAm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                        <div class="col-xs-4">
                                            下午时段：<input type="text" class="form-control input-sm" name="peacetimePricePm" value="{$detail.peacetimePricePm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员下午时段：<input type="text" class="form-control input-sm" name="memberPeacetimePricePm" value="{$detail.memberPeacetimePricePm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                        <div class="col-xs-4">
                                            晚间时段：<input type="text" class="form-control input-sm" name="peacetimePriceNight" value="{$detail.peacetimePriceNight}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员晚间时段：<input type="text" class="form-control input-sm" name="memberPeacetimePriceNight" value="{$detail.memberPeacetimePriceNight}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td><span style="color:#F00;">*</span>周末价格:</td>
                                    <td class="col-sm-8">
                                        <div class="col-xs-4">
                                            上午时段：<input type="text" class="form-control input-sm" name="weekendPriceAm" value="{$detail.weekendPriceAm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员上午时段：<input type="text" class="form-control input-sm" name="memberWeekendPriceAm" value="{$detail.memberWeekendPriceAm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                        <div class="col-xs-4">
                                            下午时段：<input type="text" class="form-control input-sm" name="weekendPricePm" value="{$detail.weekendPricePm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员下午时段：<input type="text" class="form-control input-sm" name="memberWeekendPricePm" value="{$detail.memberWeekendPricePm}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                        <div class="col-xs-4">
                                            晚间时段：<input type="text" class="form-control input-sm" name="weekendPriceNight" value="{$detail.weekendPriceNight}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                            会员晚间时段：<input type="text" class="form-control input-sm" name="memberWeekendPriceNight" value="{$detail.memberWeekendPriceNight}" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" >
                                        </div>
                                    </td>
                                </tr>

                                <tr>
                                    <td>节假日价格:</td>
                                    <td class="col-sm-8">
                                        <textarea class="form-control" rows="10" cols="60" name="holidayPriceContent">{$detail.holidayPriceContent}</textarea>
                                        <span style="color:#F00;">
                                            数据格式：2019-10-1|200|400|600，单日以英文逗号分隔，顺序依次是 日期|上午价格|下午价格|夜间价格
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td><span style="color:#F00;">*</span>球位二维码：</td>
                                    <td>
                                        <div class="col-sm-4">

                                            <input type="text" class="form-control" style="width:350px;margin-left:-15px;" name="mini_program_code" value="{$detail.mini_program_code|default=''}" id="mini_program_code" >

                                        </div>

                                        <div class="col-sm-4">

                                            <input type="button" class="btn btn-default" onClick="GetUploadify(1,'mini_program_code','mini_program_code','')"  value="上传球位二维码"/>

                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td><span style="color:#F00;">*</span>解锁二维码：</td>
                                    <td>
                                        <div class="col-sm-4">

                                            <input type="text" class="form-control" style="width:350px;margin-left:-15px;" name="qr_code" value="{$detail.qr_code|default=''}" id="qr_code" >

                                        </div>

                                        <div class="col-sm-4">

                                            <input type="button" class="btn btn-default" onClick="GetUploadify(1,'qr_code','qr_code','')"  value="上传解锁二维码"/>

                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td><span style="color:#F00;">*</span>打位状态：</td>
                                    <td>
                                        <input type="radio" name="positionStatus" value="1" <if condition="$detail.positionStatus == '1'">checked="checked"</if> > 开启
                                        <input type="radio" name="positionStatus" value="0" <if condition="$detail.positionStatus == '0'">checked="checked"</if> > 关闭
                                    </td>
                                </tr>


                                </tbody> 
                                <tfoot>
                                	<tr>
                                        <td>
                                            <input type="hidden" name="positionId" value="{$detail.positionId}">
                                        </td>
                                	    <td class="text-right"><input class="btn btn-primary" type="button" onclick="shop_submit()" value="保存"></td>
                                    </tr>
                                </tfoot>                               
                            </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function shop_submit(){
    ajax_form_submit("handle_shop", "{:url('position/doEdit')}");
}
</script>
 </body>
 </html>